#include <iostream>
#include <cstdio>
#include <vector>
#include <stack>
using namespace std;

const int maxsize = 10e8 + 10;
typedef long long ll;

int main()
{
    ll a[1000005];
    ll size = 0;
    ll t;
    while (cin >> t)
    {
        if (t == -1)
            break;
        a[size++] = t;
    }
    while (cin >> t)
    {
        if (t == -1)
            break;
        a[size++] = t;
    }
    if (size == 0)
    {
        cout << "NULL";
        return 0;
    }
    sort(a, a + size);
    cout << a[0];
    for (int i = 1; i < size; i++)
    {
        cout << " " << a[i];
    }
    return 0;
}